import { isParam } from './baseMethods';

/**
 * @exports currencyListOption 币种数据
 * @param param
 */
export const currencyListOption = () => {
  const steam = [
    {
      value: 'RMB',
      label: '人名币',
    },
    {
      value: 'USD',
      label: '美元',
    },
  ];
  return steam;
};

/**
 * @exports categoriesTaxesList  税种下拉数据
 */
export const categoriesTaxesList = (param) => {
  const steam = [
    {
      value: '1',
      label: '应税内含',
    },
    {
      value: '2',
      label: '应税外加',
    },
    {
      value: '3',
      label: '零税率',
    },
    {
      value: '4',
      label: '免税',
    },
    {
      value: '9',
      label: '不计税',
    },
  ];
  if (param) {
    return isParam(steam, 'value', param).value;
  } else {
    return steam;
  }
};

/**
 * @exports hongzucategoriesTaxesList  宏竹专用税种下拉
 */
export const hongzucategoriesTaxesList = (param?: string | undefined) => {
  const steam = [
    {
      value: '1',
      label: '经海关',
      taxRate: 0.13,
    },
    {
      value: '2',
      label: '完税进出口',
      taxRate: 0,
    },
    {
      value: '3',
      label: '1%',
      taxRate: 0.01,
    },
    {
      value: '4',
      label: '3%',
      taxRate: 0.03,
    },
    {
      value: '5',
      label: '6%',
      taxRate: 0.06,
    },
    {
      value: '6',
      label: '13%',
      taxRate: 0.13,
    },
  ];
  if (param) {
    return isParam(steam, 'value', param).value;
  } else {
    return steam;
  }
};
